import store from 'store';

/**
 * storage数据set
 * @param {String} key 
 * @param {any} value 
 * @param {any} expTime 超时时间 /ms
 */
export const storageSet = (key, value, expTime) => {
    expTime = new Date().getTime() + expTime;
    store.set(key, value, expTime);
}

/**
 * storage数据get
 * @param {String} key 
 */
export const storageGet = (key) => {
    return store.get(key);
}

/**
 * storage数据remove
 * @param {String} key 
 */
 export const storageRemove = (key) => {
    return store.remove(key);
}